package com.appkubes.portal.admin.application.auth.service;

import com.appkubes.portal.admin.application.app.role.entity.vo.RoleAddVO;
import org.keycloak.representations.idm.RoleRepresentation;

import java.util.List;

public interface KeyCloakRoleService {
    //客户端角色管理
    RoleRepresentation createClientRole(String roleName);

    RoleRepresentation createClientRole(RoleAddVO roleAddVO);

    RoleRepresentation getClientRole(String roleName);

    Boolean deleteClientRole(String clientRoleName);

    List<RoleRepresentation> getClientRoleList();

    //用户角色管理
    List<RoleRepresentation> getUserClientRoleList(String userId);

    //用户角色管理
    RoleRepresentation getUserClientRole(String userId, String roleName);

    //添加角色到用户
    void addRoleToUser(String userId, String roleName);

    void removeRoleFromUser(String userId, String roleName);
}
